Refactor indexing primitives and optimize bulk creation #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
indexPrimitivesand migrated related logic toindexingHandlerfor better modularity.optimizedBulkCreateto support higher throughput with parallel writes and increased batch size.Issue
There are blocks on Beta with a size over 700mb (
rpc->/block_results?height=X)One of those massive blocks contains 1.5 million of events, which need to be filter, processed and indexed.
All this is taking way more, like 2 or 3 minutes on some cases even with transaction, batching, 3 servers with 16 cores and 128gb Ram, NVME disks and full tuneup PostgresQL.
Type of change
Select one or more:
Sanity Checklist